home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-13 | 15.7 KB | 571 lines | [TEXT/MPS ] |
- //--------------------------------------------------------------------------------------------------
- // Skeleton.r
- // Copyright © 1991-98 by Apple Computer, Inc. All rights reserved.
- //
- // Resource File for the Skeleton Sample Program.
- //--------------------------------------------------------------------------------------------------
-
- /*
- Change History:
- 07/16/98 [TY] Added missing ';'.
- */
-
- //--------------------------------------------------------------------------------------------------
- // INCLUDE FILES
- //--------------------------------------------------------------------------------------------------
-
- // Standard Includes
-
- // MacAppTypes.r must be first
- #ifndef __MacAppTypes__
- #include "MacAppTypes.r"
- #endif
-
- #ifndef __SYSTYPES_R__
- #include "SysTypes.r"
- #endif
-
- #ifndef __BalloonTypes__
- #include "BalloonTypes.r"
- #endif
-
- #ifndef __MACAPPVERSION__
- #include "MacAppVersion.h"
- #endif
-
- #ifndef __ViewTypes__
- #include "ViewTypes.r"
- #endif
-
- #ifndef THINK_Rez
- #if qDebug | qPerform
- include "Debug.rsrc" not 'ckid';
- #endif
-
- include "Dialog.rsrc" not 'ckid';
- include "MacApp.rsrc" not 'ckid';
-
- // Includes for Building Blocks
-
- include "Printing.rsrc" not 'ckid';
-
- // Include Code Resources
-
- #ifndef MW_Rez
- #if !qNoCode
- include $$Shell("ObjApp")$$Shell("XAppName") 'CODE';
- #if qModelCFM
- include $$Shell("ObjApp")$$Shell("XAppName") 'cfrg';
- include $$Shell("ObjApp")$$Shell("XAppName") 'rseg';
- #endif
- #endif
- #endif // MW_Rez
- #endif //!THINK_Rez
-
- //--------------------------------------------------------------------------------------------------
- // CONSTANTS
- //--------------------------------------------------------------------------------------------------
-
- // Finder Information
- // ------------------
-
- #if !defined(THINK_Rez) && !defined(MW_Rez)
- #define kApplicationName $$Shell("XAppName")
- #else
- #define kApplicationName TARGET_APPLICATION_NAME
- #endif // !THINK_Rez
-
- #define kSignature 'SS02' // Application signature
- #define kFileType 'SF02' // Data file type
- #define kStationery 'sF02' // Stationery file type
-
- // Bundle Constants
- // ------------------
-
- #define kBundleID 128
- #define kApplicationID 128
- #define kDocumentID 129
- #define kStationeryID 130
-
- // Constants for Menu IDs
- // ----------------------
-
- #define mSkeletonMenu 4
-
- // Command Numbers For Menu Items
- // ------------------------------
-
- #define cCommandHandledByApplication 400
- #define cCommandHandledByDocument 401
- #define cCommandHandledByView 402
- #define cTrackerCommand 403
-
- // STR# resources
- // --------------
-
- #define kSkeletonMenuHelp 1000
- #define kSkeletonWindowTitles 1001
-
- // Text styles
- // --------------
-
- #define kSystemTextStyle 1000
-
- // 'View' resources
- // --------------
-
- #define kSkeletonWindowID kDefaultWindowID
-
- // Memory Management Resources
- // ---------------------------
-
- #define kSkeletonSeg 1000
- #define kSkeletonMem 1000
- #define kSkeletonRes 1000
-
- //--------------------------------------------------------------------------------------------------
- // RESOURCES FOR MENUS
- //--------------------------------------------------------------------------------------------------
-
- //--------------------------------------------------------------------------------------------------
- // Menu Bars
- //--------------------------------------------------------------------------------------------------
-
- resource 'MBAR' (kMBarDisplayed,
- #if qNames
- "Skeleton MBAR",
- #endif
- purgeable) {
- { mApple; mFile; mEdit; mSkeletonMenu }
- };
-
- //--------------------------------------------------------------------------------------------------
- // Menus
- //--------------------------------------------------------------------------------------------------
-
- include "Defaults.rsrc" 'CMNU' (mApple); // Grab the default Apple menus
- include "Defaults.rsrc" 'CMNU' (mFile); // Grab the default File menus
- include "Defaults.rsrc" 'CMNU' (mEdit); // Grab the default Edit menu
-
- resource 'CMNU' (mSkeletonMenu,
- #if qNames
- "Skeleton Menu",
- #endif
- nonpurgeable) {
- mSkeletonMenu,
- textMenuProc,
- EnablingManagedByMacApp,
- enabled,
- "SkeletonMenu",
- { /* array: 3 elements */
- /* [1] */ "Command Handled By Application",noIcon, "1", noMark, plain, cCommandHandledByApplication;
- /* [2] */ "Command Handled By Document", noIcon, "2", noMark, plain, cCommandHandledByDocument;
- /* [3] */ "Command Handled By View", noIcon, "3", noMark, plain, cCommandHandledByView;
- }
- };
-
- resource 'CMNU' (mBuzzwords,
- #if qNames
- "Buzzwords",
- #endif
- purgeable
- ) {
- mBuzzwords,
- textMenuProc,
- EnablingManagedByMacApp,
- enabled,
- "Buzzwords",
- { /* array: 13 elements */
- "Page Setup Change", noIcon, noKey, noMark, plain, cChangePrinterStyle;
- "Typing", noIcon, noKey, noMark, plain, cTyping;
- "Tracker Command", noIcon, noKey, noMark, plain, cTrackerCommand;
- }
- };
-
- //--------------------------------------------------------------------------------------------------
- // Balloon Help Resources for Menus
- //--------------------------------------------------------------------------------------------------
-
- // Includes resource 'STR#' (kStandardHelpStrings, "Balloon Help String 1")
- // with our application name substituted in strings
- #include "HelpStrings.r"
-
- include "Defaults.rsrc" 'hmnu' (mFile);
- include "Defaults.rsrc" 'hmnu' (mEdit);
-
- resource 'STR#' (kSkeletonMenuHelp, purgeable) {
- {
- "No help yet for this item",
- "Help For Menu Title",
- "Help For First Menu Item",
- "Help For Second Menu Item",
- "Help For Third Menu Item",
- }
- };
-
- resource 'hmnu' (mSkeletonMenu)
- {
- HelpMgrVersion,
- hmDefaultOptions,
- 0, // balloon definition function
- 0, // variation code
-
- // Missing items
- HMStringResItem
- {
- kSkeletonMenuHelp,1,
- kSkeletonMenuHelp,1,
- kSkeletonMenuHelp,1,
- kSkeletonMenuHelp,1,
- },
-
- // Title and items
- {
- // Title
- HMStringResItem
- {
- kSkeletonMenuHelp,2,
- kSkeletonMenuHelp,2,
- kSkeletonMenuHelp,2,
- kSkeletonMenuHelp,2,
- },
- // First Item
- HMStringResItem
- {
- kSkeletonMenuHelp,3,
- kSkeletonMenuHelp,3,
- kSkeletonMenuHelp,3,
- kSkeletonMenuHelp,3,
- },
- // Second Item
- HMStringResItem
- {
- kSkeletonMenuHelp,4,
- kSkeletonMenuHelp,4,
- kSkeletonMenuHelp,4,
- kSkeletonMenuHelp,4,
- },
- // Third Item
- HMStringResItem
- {
- kSkeletonMenuHelp,5,
- kSkeletonMenuHelp,5,
- kSkeletonMenuHelp,5,
- kSkeletonMenuHelp,5,
- },
- }
- };
-
- //--------------------------------------------------------------------------------------------------
- // RESOURCES FOR VIEWS, DIALOGS, ALERTS etc.
- //--------------------------------------------------------------------------------------------------
-
- //--------------------------------------------------------------------------------------------------
- // About Box
- //--------------------------------------------------------------------------------------------------
-
- resource 'DITL' (phAboutApp,
- #if qNames
- "phAboutApp",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {167, 288, 187, 348},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {10, 75, 154, 348},
- StaticText {
- disabled,
- "This sample program demonstrates large views and mouse tracking."
- "\n"
- WRITTEN_WITH_MACAPP
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- noteIcon
- }
- }
- };
-
- include "Defaults.rsrc" 'ALRT' (phAboutApp); // Grab the default about box
- include "Defaults.rsrc" 'aete' (0); // Grab the default AppleEvent terminology
- include "Defaults.rsrc" 'STR#' (kDefaultCredits); // Grab the default credits
-
-
- //--------------------------------------------------------------------------------------------------
- // MultiFinder™ information
- //--------------------------------------------------------------------------------------------------
-
- /* Additional size deltas to be added to partition size */
-
- #if qNames
- #define kNamesSizeDelta 75
- #else
- #define kNamesSizeDelta 0
- #endif
-
- #if qDebug
- #define kDebugSizeDelta 0
- #else
- #define kDebugSizeDelta 0
- #endif
-
- #define kModelFarSizeDelta 0
-
- #ifndef MW_Rez // MW projects supply size resource for us
- resource 'SIZE' (-1) {
- saveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
- doesActivateOnFGSwitch,
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreAppDiedEvents,
- is32BitCompatible,
- isHighLevelEventAware,
- localAndRemoteHLEvents,
- notStationeryAware,
- reserved,
- reserved,
- reserved,
- reserved,
-
- /* Suggested partition size */
- (1000 + kNamesSizeDelta + kDebugSizeDelta + kModelFarSizeDelta) * 1024,
-
- /* Minimum partition size */
- (800 + kNamesSizeDelta + kDebugSizeDelta + kModelFarSizeDelta) * 1024
- };
- #endif // !MW_Rez
-
- //--------------------------------------------------------------------------------------------------
- // Icons
- //--------------------------------------------------------------------------------------------------
-
- include "Defaults.rsrc" 'ICN#' (kApplicationID); // MacApp Family large black & white
- include "Defaults.rsrc" 'ICN#' (kDocumentID); // MacApp Document large black & white
- include "Defaults.rsrc" 'ICN#' (kStationeryID); // MacApp Stationery large black & white
- include "Defaults.rsrc" 'ics#' (kApplicationID); // MacApp Family small black & white
- include "Defaults.rsrc" 'ics#' (kDocumentID); // MacApp Document small black & white
- include "Defaults.rsrc" 'ics#' (kStationeryID); // MacApp Stationery small black & white
- include "Defaults.rsrc" 'ics4' (kApplicationID); // MacApp Family small 4 bit
- include "Defaults.rsrc" 'ics4' (kDocumentID); // MacApp Document small 4 bit
- include "Defaults.rsrc" 'ics4' (kStationeryID); // MacApp Stationery small 4 bit
- include "Defaults.rsrc" 'ics8' (kApplicationID); // MacApp Family small 4 bit
- include "Defaults.rsrc" 'ics8' (kDocumentID); // MacApp Document small 4 bit
- include "Defaults.rsrc" 'ics8' (kStationeryID); // MacApp Stationery small 4 bit
- include "Defaults.rsrc" 'icl4' (kApplicationID); // MacApp Family large 4 bit
- include "Defaults.rsrc" 'icl4' (kDocumentID); // MacApp Document large 4 bit
- include "Defaults.rsrc" 'icl4' (kStationeryID); // MacApp Stationery large 4 bit
- include "Defaults.rsrc" 'icl8' (kApplicationID); // MacApp Family large 8 bit
- include "Defaults.rsrc" 'icl8' (kDocumentID); // MacApp Document large 8 bit
- include "Defaults.rsrc" 'icl8' (kStationeryID); // MacApp Stationery large 8 bit
-
- //--------------------------------------------------------------------------------------------------
- // Memory usage information for Skeleton
- //--------------------------------------------------------------------------------------------------
-
- // See UMemory.h
- // -------------
-
- // Code fragment resource for PowerPC native apps
- // ----------------------------------------------
- #ifndef MW_Rez // Metrowerks will supply it's own cfrg
- #if qPowerPC
- #include "CodeFragmentTypes.r"
-
- resource 'cfrg' (0, "Configuration Info") {
- {
- kPowerPC,
- kFullLib,
- kNoVersionNum,
- kNoVersionNum,
- 0,
- 0,
- kIsApp,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- "Skeleton"
- }
- };
- #endif
- #endif // MW_Rez
-
- //--------------------------------------------------------------------------------------------------
- // Icons, Bundles and FRefs… Oh my! (don't forget the Signature)
- //--------------------------------------------------------------------------------------------------
-
- type kSignature as 'STR ';
- resource kSignature (0,
- #if qNames
- "Signature",
- #endif
- purgeable) {
- "Skeleton ©Apple Computer, Inc. 1988-95"
- };
-
- resource 'FREF' (kApplicationID,
- #if qNames
- "Skeleton Application",
- #endif
- purgeable) {
- 'APPL',
- 0,
- ""
- };
-
- resource 'FREF' (kDocumentID,
- #if qNames
- "Skeleton Document",
- #endif
- purgeable) {
- kFileType,
- 1,
- ""
- };
-
- resource 'FREF' (kStationeryID,
- #if qNames
- "Skeleton Stationery",
- #endif
- purgeable) {
- kStationery,
- 2,
- ""
- };
-
- resource 'BNDL' (kBundleID,
- #if qNames
- "Skeleton",
- #endif
- purgeable) {
- kSignature,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'ICN#',
- { /* array IDArray: 3 elements */
- 0, kApplicationID,
- 1, kDocumentID,
- 2, kStationeryID
- },
- /* [2] */
- 'FREF',
- { /* array IDArray: 3 elements */
- 0, kApplicationID,
- 1, kDocumentID,
- 2, kStationeryID
- }
- }
- };
-
- //--------------------------------------------------------------------------------------------------
- // Version resources
- //--------------------------------------------------------------------------------------------------
-
- // The revision of this particular file
-
- RESOURCE 'vers' (1,
- #if qNames
- "File Version",
- #endif
- purgeable) {
- 0x01,
- 0x01,
- development,
- 0x01,
- verUs,
- "1.1d1",
- "Skeleton 1.1d1, ©Apple Computer, Inc. 1988-97"
- };
- include "Defaults.rsrc" 'vers' (2); // Overall package
-
- //--------------------------------------------------------------------------------------------------
- // Views
- //--------------------------------------------------------------------------------------------------
- #ifndef MW_Rez
- // This Adlib file is included in IconEdit.prj for MW Builds
- include "IconEdit.view";
- #endif
-
- #if 0 // The following has been moved into IconEdit.view AdLib file
-
- resource 'STR#' (kSkeletonWindowTitles,
- #if qNames
- "Window titles",
- #endif
- purgeable) {
- {
- ""
- }
- };
-
- resource 'TxSt' (kSystemTextStyle, purgeable) {tsPlain, 0, black, ""};
-
- resource 'View' (kSkeletonWindowID,
- #if qNames
- "kSkeletonWindowID",
- #endif
- purgeable) { MAThreeOh,
- {
- ViewSignatureAndClassname
- {'wind', 534, "", 'WIND', enabled, noIdle, {}, MAThreeOh,
- {50, 20}, {260, 430}, sizeVariable, sizeVariable, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- AdornerListSignatureAndClassname {NoIdentifier, AdornerList, AdornerElementSize, AdornerElementSizeShift, DynamicArrayAllocationIncrement, {
- AdornFirst, AdornerLocalObject {EraseAdorner},
- DrawView, AdornerLocalObject {DrawAdorner},
- AdornLast, AdornerLocalObject {ResizeIconAdorner}}}, emptyUserArea,
- Window {zoomDocProc, 'SKEL', goAwayBox, resizable, ignoreFirstClick,
- freeOnClosing, disposeOnFree, closesDocument, openWithDocument, dontAdaptToScreen, stagger, forceOnScreen,
- dontCenter, doesntFloat, doesntHideOnSuspend, generateActivates, filler, kSkeletonWindowTitles, 1}, 3},
- ViewSignatureAndClassname
- {'scrl', 186, "", 'SCLR', enabled, noIdle, {}, MAThreeOh,
- {0, 0}, {245, 415}, sizeRelSuperView, sizeRelSuperView, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- NoAdorners {}, emptyUserArea,
- Scroller {'vCLR', 'hCLR', {0, 0}, {16, 16}, VertConstrain, HorzConstrain, noInset, respondsToFKeys}, 1},
- ViewSignatureAndClassname
- {'view', 75, "TViewSkeleton", 'SKEL', enabled, noIdle, {}, MAThreeOh,
- {0, 0}, {72 * 15, 72 * 12}, sizeFixed, sizeFixed, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- NoAdorners {}, emptyUserArea,
- View {},
- NoSubviews},
- ViewSignatureAndClassname
- {'ssbr', 101, "", 'hCLR', enabled, noIdle, {}, MAThreeOh,
- {245, -1}, {16, 417}, sizeVariable, sizeVariable, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- NoAdorners {}, emptyUserArea,
- ScrollerScrollBar {mHScrollBarHit, notHilited, notDimmed, sizeable, noInset, kSystemTextStyle, dontPreferOutline, h, 0, 0, 39585},
- NoSubviews},
- ViewSignatureAndClassname
- {'ssbr', 101, "", 'vCLR', enabled, noIdle, {}, MAThreeOh,
- {-1, 415}, {247, 16}, sizeVariable, sizeVariable, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- NoAdorners {}, emptyUserArea,
- ScrollerScrollBar {mVScrollBarHit, notHilited, notDimmed, sizeable, noInset, kSystemTextStyle, dontPreferOutline, v, 0, 0, 49755},
- NoSubviews}
- }
- };
-
- #endif // Views moved into Skeleton.view AdLib file
-